package com.example.chat.utils;


public class UserHolder {
    private static final ThreadLocal<Long> tl = new ThreadLocal<>();

    public static void setCurrentId(Long id){
        tl.set(id);
    }

    public static Long getCurrentId(){
        return tl.get();
    }

    public static void removeCurrentId(){
        tl.remove();
    }
}
